Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Snyk] Upgrade zod from 3.22.4 to 3.23.6 #93

Open
wants to merge 30 commits into
base: master
Choose a base branch
from

Conversation

Niraj-Dilshan
Copy link
Owner

This PR was automatically created by Snyk using the credentials of a real user.


![snyk-top-banner](https://github.com/andygongea/OWASP-Benchmark/assets/818805/c518c423-16fe-447e-b67f-ad5a49b5d123)

Snyk has created this PR to upgrade zod from 3.22.4 to 3.23.6.

ℹ️ Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.


  • The recommended version is 63 versions ahead of your current version.

  • The recommended version was released on 22 days ago.

Release notes
Package name: zod
  • 3.23.6 - 2024-05-03

    Commits:

  • 3.23.5 - 2024-04-29

    Commits:

  • 3.23.4 - 2024-04-23

    Commits:

  • 3.23.3 - 2024-04-22

    Commits:

  • 3.23.2 - 2024-04-22

    Commits:

  • 3.23.1 - 2024-04-22

    This changes the default generics back to any to prevent breakages with common packager like @ hookform/resolvers:

    - class ZodType<Output = unknown, Def extends ZodTypeDef = ZodTypeDef, Input = unknown> {}
    + class ZodType<Output = any, Def extends ZodTypeDef = ZodTypeDef, Input = any> {}

    Commits:

  • 3.23.0 - 2024-04-21

    Zod 3.23 is now available. This is the final 3.x release before Zod 4.0. To try it out:

    npm install zod

    Features

    z.string().date()

    Zod can now validate ISO 8601 date strings. Thanks @ igalklebanov! #1766

    const schema = z.string().date();
    schema.parse("2022-01-01"); // OK

    z.string().time()

    Zod can now validate ISO 8601 time strings. Thanks @ igalklebanov! #1766

    const schema = z.string().time();
    schema.parse("12:00:00"); // OK

    You can specify sub-second precision using the precision option:

    const schema = z.string().time({ precision: 3 });
    schema.parse("12:00:00.123"); // OK
    schema.parse("12:00:00.123456"); // Error
    schema.parse("12:00:00"); // Error

    z.string().duration()

    Zod can now validate ISO 8601 duration strings. Thanks @ mastermatt! #3265

    const schema = z.string().duration();
    schema.parse("P3Y6M4DT12H30M5S"); // OK

    Improvements to z.string().datetime()

    Thanks @ bchrobot #2522

    You can now allow unqualified (timezone-less) datetimes using the local: true flag.

    const schema = z.string().datetime({ local: true });
    schema.parse("2022-01-01T12:00:00"); // OK

    Plus, Zod now validates the day-of-month correctly to ensure no invalid dates (e.g. February 30th) pass validation. Thanks @ szamanr! #3391

    z.string().base64()

    Zod can now validate base64 strings. Thanks @ StefanTerdell! #3047

    const schema = z.string().base64();
    schema.parse("SGVsbG8gV29ybGQ="); // OK

    Improved discriminated unions

    The following can now be used as discriminator keys in z.discriminatedUnion():

    • ZodOptional
    • ZodNullable
    • ZodReadonly
    • ZodBranded
    • ZodCatch
    const schema = z.discriminatedUnion("type", [
      z.object({ type: z.literal("A").optional(), value: z.number() }),
      z.object({ type: z.literal("B").nullable(), value: z.string() }),
      z.object({ type: z.literal("C").readonly(), value: z.boolean() }),
      z.object({ type: z.literal("D").brand<"D">(), value: z.boolean() }),
      z.object({ type: z.literal("E").catch("E"), value: z.unknown() }),
    ]);

    Misc

    Breaking changes

    There are no breaking changes to the public API of Zod. However some changes can impact ecosystem tools that rely on Zod internals.

    ZodFirstPartySchemaTypes

    Three new types have been added to the ZodFirstPartySchemaTypes union. This may impact some codegen libraries. #3247

    +  | ZodPipeline<any, any>
    +  | ZodReadonly<any>
    +  | ZodSymbol;

    Unrecognized keys in .pick() and .omit()

    This version fixes a bug where unknown keys were accidentally accepted in .pick() and omit(). This has been fixed, which could cause compiler errors in some user code. #3255

    z.object({ 
      name: z.string() 
    }).pick({
      notAKey: true // no longer allowed
    })

    Bugfixes and performance

    Docs and ecosystem

    New Contributors

snyk-bot and others added 30 commits November 27, 2023 17:00
…2a41d61c45b47

[Snyk] Fix for 20 vulnerabilities
…51e73e3368be3

[Snyk] Security upgrade python from 3.10-slim to 3.13-rc-slim
Bumps [redis](https://github.com/redis/redis-py) from 4.3.6 to 4.4.4.
- [Release notes](https://github.com/redis/redis-py/releases)
- [Changelog](https://github.com/redis/redis-py/blob/master/CHANGES)
- [Commits](redis/redis-py@v4.3.6...v4.4.4)

---
updated-dependencies:
- dependency-name: redis
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
The following vulnerabilities are fixed by pinning transitive dependencies:
- https://snyk.io/vuln/SNYK-PYTHON-CRYPTOGRAPHY-6092044
…reduce vulnerabilities

The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-JS-INFLIGHT-6095116
…c17c0a53fe8db9

[Snyk] Security upgrade react-query from 3.39.3 to 4.0.0
…98c8018077a5e6

[Snyk] Security upgrade cryptography from 41.0.5 to 41.0.6
build(deps): bump redis from 4.3.6 to 4.4.4
…80351efb1c62afa30

[Snyk] Upgrade react-hook-form from 7.43.2 to 7.48.2
…bd7f6009199ea4f09

[Snyk] Upgrade react-datepicker from 4.10.0 to 4.21.0
…ccaeaed2150c2cd65

[Snyk] Upgrade vite-tsconfig-paths from 4.0.5 to 4.2.1
…370d1941a8b2d376e

[Snyk] Upgrade apexcharts from 3.40.0 to 3.44.0
…821691bb9b738929ca

[Snyk] Upgrade react-router-dom from 6.8.1 to 6.18.0
…e8ac3da508e4c918ea

[Snyk] Upgrade @chakra-ui/react from 2.5.5 to 2.8.2
…e5ead344994cc8720f

[Snyk] Upgrade i18next-http-backend from 2.2.0 to 2.4.1
…eac0633048c4cb8450

[Snyk] Upgrade react-i18next from 12.2.0 to 12.3.1
…95d0c24a204a9ce794

[Snyk] Upgrade react-loading-skeleton from 3.1.1 to 3.3.1
Snyk has created this PR to upgrade zod from 3.22.4 to 3.23.6.

See this package in npm:
zod

See this project in Snyk:
https://app.snyk.io/org/niraj-dilshan/project/0b571b4b-68d2-405c-b488-037d409eee8b?utm_source=github&utm_medium=referral&page=upgrade-pr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Prisma XOR with Zod > 3.21.1 not working
2 participants